Configuring MoH from External Audio Source

The device's Gateway application (FXS interfaces) can play Music on Hold (MoH) audio originating from an external, third-party media (audio) player, to call parties that are placed on hold. Implementing an external media source offers flexibility in the type of audio that you want played as MoH (e.g., radio, adverts, or music). If you are not using an external media source, the device plays its' local default hold tone or a hold tone from an installed PRT file (depending on your configuration). The device can forward this audio stream to any external IP-based system (for example, a softswitch, media gateway or SBC) or use it for SBC calls that it processes (applicable only to the SBC application). Thus, the device functions like an IP media server (audio streamer), except that the actual source of the media is from an external player.

The external media source is connected to the device's FXS port through a telephone adapter (for FXS emulation). The FXS port is always in off-hook state, continuously receiving media streams from the external media source. When the device receives a SIP INVITE for this port (IP-to-Tel call), it responds with a SIP 200 OK and forwards the audio stream to the sender of the INVITE.

Up to two FXS ports can be used for this feature, where each port can play media to up to 20 concurrent call sessions. In addition, each FXS port can play a specific media for MoH. For example, one port can play music while the other port can play advertising messages.

The following figure provides an example of this feature where each FXS port receives different audio from the external audio player, which the device forwards as music-on-hold to an external call processing system. The device determines which audio to play based on the phone number (destination) of the held call party.

To configure MoH from external audio streamer:
1. Connect the external media player to one of the device's FXS ports through an FXS emulator (analog telephone adapter).
2. Open the Tel Profiles table (see Configuring Tel Profile), and then configure a Tel Profile with the following:
'IP-to-Tel Cut-Through Call Mode' parameter configured to CutThrough+Streaming:

'Coders Group' parameter assigned to the required Coder Group (configured with one coder).
3. Open the Trunk Groups table (see Configuring Trunk Groups), and then configure a Trunk Group for the FXS port to which the external media player is connected. Specify the phone number and Trunk Group ID, and assign it the Tel Profile that you configured in the previous step.

4. Open the Trunk Group Settings table (see Configuring Trunk Group Settings), and then for the Trunk Group that you configured in the previous step, configure the 'Channel Select Mode' parameter to By Dest Phone Number.

5. Open the IP-to-Tel Routing table (see Configuring IP-to-Tel Routing Rules), and then configure a routing rule to route INVITE messages from the remote IP call entity to which you want to play MoH, to the FXS port. Configure the rule as follows:
'Destination Type': Trunk Group
'Trunk Group ID': 1 (as configured in Step 3 above)
Configure a specific matching characteristics, for example, 'Source Host Pattern': mypizza.com
6. Open the Supplementary Services Settings page (Setup menu > Signaling & Media tab > Gateway folder > DTMF & Supplementary > Supplementary Services Settings), and then in the 'Maximum simultaneous streaming calls' field (MaxStreamingCalls), enter the maximum number of concurrent calls that the FXS port can service for playing MoH.
7. Click Apply, and then restart the device with a save-to-flash for your settings to take effect.

You can forcibly stop or start audio streaming on the FXS port(s) through CLI:

To start audio streaming:
admin streaming start <FXS Channel>|all
To stop audio streaming:
admin streaming stop <FXS Channel>|all
The feature is applicable only to the Gateway application (FXS interfaces). However, you can also use this feature for playing MoH to SBC calls. For this scenario, you need to configure a routing rule between the SBC application (IP-to-IP Routing rule with 'Destination Type' parameter configured to Gateway) and the Gateway application (IP-to-Tel Routing table, as described above).
You must configure the 'Maximum simultaneous streaming calls' parameter to a value greater than 0.
Each FXS port that is used for this audio streaming service must be configured with its own dedicated Tel Profile, Trunk Group, and IP-to-Tel Routing rule.
Only one coder can be configured for the port. If the device receives an INVITE/re-INVITE with a coder that is different to the one configured for the Tel Profile, the device rejects it.
If the external audio streamer is disconnected or powered off, the FXS port changes to on-hook state and the device stops playing MoH to call parties that are currently on hold (by sending a SIP BYE).
If the port goes on-hook or the number of concurrent sessions exceed the configured maximum, the device rejects all streaming sessions with a SIP BYE response.
If your streaming service is working and you want to modify its configuration, after you have modified configuration you need to restart the service.